package com.boruiimage.demo.mapperDao;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface filePart {
    //添加图片信息
    @Insert("insert into imginfo(userName,imgName,imgDetil,imgResult,date,imgType,payMoney,payType,eliserId,imgCard)VALUES(" +
            "#{userName},#{imgName},#{imgDetil},#{imgResult},NOW(),#{imgType},#{payMoney},#{payType},#{eliserId},#{imgCard})")
    int addImg(@Param(value = "userName")String userName,@Param(value = "imgName")String imgName,
               @Param(value = "imgDetil")String imgDetil ,@Param(value = "imgResult")String imgResult,
               @Param(value = "imgType")String imgType,@Param(value = "payMoney")Integer payMoney,
               @Param(value = "payType")String payType ,@Param(value="eliserId")Integer eliserId,
               @Param(value = "imgCard")String imgCard);
    //通過圖片名稱查詢id
    @Select("select imgCard from  imginfo where imgName=#{imgName}")
    String idShow(@Param(value = "imgName")String imgName);
}
